x86/hvm/viridian: fix APIC assist page leak
authorPaul Durrant <paul.durrant@citrix.com>
Tue, 29 Mar 2016 12:26:33 +0000 (14:26 +0200)
committerJan Beulich <jbeulich@suse.com>
Tue, 29 Mar 2016 12:26:33 +0000 (14:26 +0200)
commitb93687291574ee64b8244e15455a71d663787962
tree05b41a48abbdedce8eb23a53cc8748c17378e49d
parent78c5f59ebd79117321a988c200048b5d94aa5df6
x86/hvm/viridian: fix APIC assist page leak

Commit a6f2cdb6 "keep APIC assist page mapped..." introduced a page
leak because it relied on viridian_vcpu_deinit() always being called
to release the page mapping. This does not happen in the case a normal
domain shutdown.

This patch fixes the problem by introducing a new function,
viridian_domain_deinit(), which will iterate through the vCPUs and
release any page mappings still present.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
xen/arch/x86/hvm/hvm.c
xen/arch/x86/hvm/viridian.c
xen/include/asm-x86/hvm/viridian.h